Conventionally, it has been known that there exists a game apparatus displaying a three dimensional game space on a display screen, and, by operating a touch panel provided on the display screen, allows an input operation for a game (for example, refer to FIG. 23 in Japanese Laid-Open Patent Publication 2002-939 (herein after, referred to as “Patent Document 1”)). In the game apparatus described in Patent Document 1, a player character placed in the three dimensional game space has a sword, and a user can operate the sword by touching the touch panel. Specifically, the user can let the player character slash an enemy by touching the position of the sword displayed on the touch panel, and moving (dragging), while maintaining the contact on the touch panel, his or her finger to a position where the enemy is displayed.
In the game apparatus described in the aforementioned Patent Document 1, displayed on the display screen is the three dimensional game space being viewed from a virtual camera provided in the game space. However, in the game apparatus described in the aforementioned Patent Document 1, it is conceivable that a direction of the virtual camera (namely, a gazing point) is automatically controlled such that, for example, the gazing point of the virtual camera always focuses on a middle point between the player character and the enemy. In such a case, however, a following problem emerges.
In the case where the direction of the virtual camera is automatically controlled such that the gazing point of the virtual camera always focuses on the middle point between the player character and the enemy, according to a movement of the player character or the enemy, the direction of the virtual camera rapidly changes. It follows that, according to the change in the direction of the virtual camera, positions of the player character, the sword possessed by the player character, and the enemy displayed on the display screen also rapidly change. As a result, when the user tries to drag the sword to the position of the enemy by using the touch panel, there is a problem that an accurate dragging to the position of the enemy is difficult due to the rapid change in the position of the enemy. Predicting the movement of the enemy swiftly moving in the game space so as to hit the enemy with the sword leads to an enhancement of a sense of entertainment in the game. However, even if the user can predict a point to which the enemy moves in the game space, where on the display screen the point is displayed depends on a position of the virtual camera, and therefore, if the direction of the virtual camera rapidly changes, the sense of entertainment in attacking the enemy by predicting the movement of the enemy is lost. For example, as in FIG. 16A, even if a player makes a prediction concerning a point to which the enemy moves, and drags the sword of the player character toward the predicted point, the gazing point of the virtual camera shifts due to the movement of the enemy, causing, as in FIG. 16B, the player character to miss the enemy even when the prediction of the player is accurate.
Note that although the above described example illustrates a case where the direction of the virtual camera automatically changes such that the gazing point of the virtual camera always focuses on the middle point between the player character and the enemy, similar problems emerge when a position or an angle of view of the virtual camera changes.
Therefore, a feature of certain exemplary embodiments is to provide a game program allowing, when a player designates an arbitrary point in a three dimensional game space by using a touch panel, the point which is intended by the player to be accurately designated.
In order to solve the above problem, certain exemplary embodiments employ the following configuration. Reference numerals and figure numbers in parentheses show a corresponding relationship with the drawings to help understand the exemplary embodiments, and are not in any way limiting the scope of the present invention.
A first aspect of certain exemplary embodiments is directed to a storage medium storing a game program for displaying, on a display device (12) provided with a touch panel (15), objects (OB1 to OB3) placed in a three dimensional game space, based on a virtual camera (VC) provided in the game space.
The game program is a program for causing a computer (21) to execute: a camera control step (S21); a game image generation step (S35); a touch coordinates detection step (S15); a camera fixing step (S23); and a designation coordinates calculation step (S25).
The camera control step is a step of changing a setting value for the camera, the value indicative of at least one of a position (40a), a gazing point (40b), and an angle of view (40c) of the virtual camera; the game image generation step is a step of generating a game image to be displayed on the display device by drawing the objects based on the setting value for the camera; the touch coordinates detection step is a step of detecting touch coordinates (42) indicative of a touched position on the touch panel based on an output signal from the touch panel; the camera fixing step is a step of fixing, when the touch coordinates are detected while the setting value for the camera is changing, the setting value for the camera such that the value remains unchanged at least until the detection for the touch coordinates stops; and the designation coordinates calculation step is a step of sequentially calculating, when the touch coordinates are changed, in a state where the setting value for the camera is fixed, three dimensional coordinates, in the game space, corresponding to the changed touch coordinates, and accepting the outcome as designation coordinates (43) designated by a player.
In a second aspect based on the first aspect, the game program causes the computer to further execute an operation target object placement step (S29) and an operation target object movement step (S33).
The operation target object placement step is a step of placing, when the touch coordinates are detected while the setting value for the camera is changing, an operation target object (CT1) on the three dimensional coordinates, in the game space, corresponding to the touch coordinates; and the operation target object movement step is a step of moving the operation target object in accordance with a change in the designation coordinates sequentially calculated in the designation coordinates calculation step.
In a third aspect based on the first aspect, the designation coordinates calculation step calculates the designation coordinates corresponding to the touch coordinates detected in the touch coordinates detection step by mapping each point on the touch panel to a predetermined plane (VS) set in a view volume in the game space (FIG. 12).
In a fourth aspect based on the first aspect, the camera control step changes the setting value for the camera per unit time, based on a predetermined computational expression (S19).
A fifth aspect is directed to a storage medium storing a game program for displaying, on a display device (12) provided with a touch panel (15), objects (OB1 to OB3) placed in a three dimensional game space, based on a virtual camera (VC) provided in the game space.
The game program is a program for causing a computer (21) to execute: a first camera control step (S21); a game image generation step (S35); a touch coordinates detection step (S15); an object determination step (S45); a camera fixing step (S47); a designation coordinates calculation step (S41); and an operation target object movement step (S53).
The first camera control step is a step of changing a setting value for the camera, the value indicative of at least one of a position (40a), a gazing point (40b), and an angle of view (40c) of the virtual camera; the game image generation step is a step of generating a game image to be displayed on the display device by drawing the objects based on the virtual camera; the touch coordinates detection step is a step of detecting touch coordinates (42) indicative of a touched position on the touch panel based on an output signal from the touch panel; the object determination step is a step of determining whether an operation target object (CT2) is displayed at a position, on a screen of the display device, corresponding to the touch coordinates, based on the touch coordinates detected in the touch coordinates detection step; the camera fixing step is a step of fixing, when the operation target object is determined, in the object determination step, as being displayed at the position, on the screen of the display device, corresponding to the touch coordinates while the setting value for the camera is changing, the setting value for the camera such that the value remains unchanged at least until the detection for the touch coordinates stops; the designation coordinates calculation step is a step of sequentially calculating, when the touch coordinates are changed, in a state where the setting value for the camera is fixed, three dimensional coordinates, in the game space, corresponding to the changed touch coordinates, and accepting the outcome as designation coordinates (43) designated by a player; and the operation target object movement step is a step of updating a position of the operation target object in the game space in accordance with a change in the designation coordinates sequentially calculated in the designation coordinates calculation step.
In a sixth aspect based on the fifth aspect, the game program causes the computer to further execute a second camera control step (S51) of changing, when the operation target object is determined, in the object determination step, as not being displayed at the position, on the screen of the display device, corresponding to the touch coordinates while the setting value for the camera is changing, the setting value for the camera in accordance with the touch coordinates.
In a seventh aspect based on the fifth aspect, the camera control step changes the setting value for the camera per unit time, based on a predetermined computational expression (S19).
According to the above-described first aspect, when the touch coordinates are detected, the setting value for the camera is temporarily fixed at least until the detection for the touch coordinates stops, and therefore, when the player tries to designate a desired point in the game space by using the touch panel, the display position thereof is not changed, thereby allowing the player to swiftly and accurately designate the desired point in the game space.
According to the above-described second aspect, when the touch coordinates are detected, the setting value for the camera is temporarily fixed at least until the detection of the touch coordinates stops, and therefore, when the player tries to move an operation target object to the desired point in the game space by using the touch panel, the display position thereof is not changed, thereby allowing the player to swiftly and accurately move the operation target object to the desired point in the game space.
According to the above-described third aspect, by mapping the touch coordinates to a virtual plane in the game space, two dimensional touch coordinates can be converted to three dimensional coordinates in the game space.
According to the above-described fourth aspect, the setting value for the camera can be automatically controlled based on a predetermined algorithm. Even in such a case, when the touch coordinates are detected, the setting value for the camera is temporarily fixed at least until the detection for the touch coordinates stops, and therefore, when the player tries to designate a desired point in the game space by using the touch panel, the display position thereof is not changed, thereby allowing the player to swiftly and accurately designate the desired point in the game space.
According to the above-described fifth aspect, when the operation target object is displayed at the position, on the screen of the display device, corresponding to the touch coordinates, the setting value for the camera is temporarily fixed at least until the detection for the touch coordinates stops, and therefore, when the player tries to move the operation target object to the desired point in the game space by using the touch panel, the display position thereof is not changed, thereby allowing the player to swiftly and accurately move the operation target object to the desired position in the game space.
According to the above-described sixth aspect, in addition to the effect in the fifth aspect that the operation target object can be swiftly and accurately moved to the desired position in the game space, provided is an effect in that, when the operation target object is not displayed at the position, on the screen of the display device, corresponding to the touch coordinates, the setting value for the camera changes according to the touch coordinates, thereby allowing the player to change the setting value for the camera by using the touch panel.
According to the above-described seventh aspect, the setting value for the camera can be automatically controlled based on the predetermined algorithm. Even in such a case, when the operation target object is displayed at the position, on the screen of the display device, corresponding to the touch coordinates, the setting value for the camera is temporarily fixed at least until the detection for the touch coordinates stops, and therefore, when the player tries to move the operation target object to the desired point in the game space by using the touch panel, the display position thereof is not changed, thereby allowing the player to swiftly and accurately move the operation target object to the desired position in the game space.
These and other features, aspects and advantages of the present invention will become more apparent from the following detailed description of certain exemplary embodiments when taken in conjunction with the accompanying drawings.